package net.xdclass.service;

import net.xdclass.domain.Video;
import net.xdclass.service.fallback.VideoServiceFallBack;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;

@FeignClient(name = "xdclass-video-service", fallback = VideoServiceFallBack.class)
public interface VideoService {

    @RequestMapping("/api/v1/video/find_by_id")
    Video findById(@RequestParam("id") Integer id);

    @RequestMapping("/api/v1/video/save")
    Video save(@RequestBody Video video);
}
